<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/jspgou_sys/head.html"/>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
function change(ptype){
	document.getElementById("caList").options.length=0;
	$.post("o_selectCategory.do",{id:ptype.value},function(data){
             document.getElementById("caList").options.length=0;
             data=window.eval("("+data+")");
             var i=-1;
             for(var key in data){
                 i++
                var newoption=new Option(data[key],key);
                document.getElementById("caList").options[i]=newoption;
                 }
		});
}
</script>
</head>
<body>
<#include "/common/image_upload.html"/>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: <@s.m "shop.function.category"/> - <@s.m "brand.function"/> - <@s.m "global.add"/></div>
	<form class="ropt">
		<input type="submit" value="<@s.m "global.backToList"/>" onclick="this.form.action='v_list.do';"/>
	</form>
	<div class="clear"></div>
</div>
<@p.form id="jvForm" action="o_save.do" labelWidth="12">
<@p.text colspan="1" width="50" label="优惠劵名称" name="couponName" required="true" class="required" maxlength="50"/>
<@p.td colspan="2">
优惠券开始时间：<input type="text" id="couponTime" name="couponTime" required="true" class="required" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'couponEndTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/><br/>
优惠券结束时间：<input type="text" id="couponEndTime" name="couponEndTime" required="true" class="required" onclick="WdatePicker({minDate:'#F{$dp.$D(\'couponTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
</@p.td><@p.tr/>
<@p.text colspan="2" width="50" label="至少消费价格" name="leastPrice" required="true" class="required"/><@p.tr/>
<@p.td label="优惠劵图" colspan="1" width="50" noHeight="true">
<@p.text id="uploadImgPath11" name="couponPicture" size="30"/> <input type="button" value="<@s.m "imageupload.clear"/>" onclick="clearImg(11);"/><br/>
<span id="ufc11"><input type="file" id="uploadFile11" size="20"/></span> <input type="button" value="<@s.m "imageupload.upload"/>" onclick="upload(11);"/><br/>
<@s.m "global.width"/>: <input type="text" id="zoomWidth11" value="139" size="5"/> <@s.m "global.height"/>: <input type="text" id="zoomHeight11" value="139" size="5"/> <input type="button" value="<@s.m "imageupload.cut"/>" onclick="imgCut(11);"/> 
</@p.td><@p.td colspan="1" width="50">
<img id="preImg11" alt="<@s.m "imageupload.preview"/>" srcRoot="${uploadRoot!}" style="width:100px;height:70px;background-color:#CCCCCC;border:1px solid #333"/>
</@p.td><@p.tr/>
<@p.text colspan="2" width="50" label="优惠价格" name="couponPrice" required="true" class="required"/><@p.tr/>
<@p.td colspan="2"><@p.submit code="global.submit"/> &nbsp; <@p.reset code="global.reset"/></@p.td>
</@p.form>
</div>
</body>
</html>